from flask_restful import fields

movie_fields = {
    'mid' : fields.Integer,
    'show_name' : fields.String,
    'show_name_en':  fields.String,
    'director':  fields.String,
    'leading_role' : fields.String,
    'type':  fields.String,
    'country':  fields.String,
    'language' : fields.String,
    'duration' : fields.String,
    'screening_model' : fields.String,
    'open_day' : fields.DateTime(dt_format='iso8601'),
    'pic' : fields.String,
    'flag' : fields.Integer,
}


movies_fields = {
    'page':fields.Integer,
    'hot_count': fields.Integer,
    'will_count': fields.Integer,
    'hot_movies':fields.List(fields.Nested(movie_fields)),
    'will_movies':fields.List(fields.Nested(movie_fields))
}

data_fields = {
    'movie':fields.Nested(movies_fields),
}

result = {
    'status':fields.Integer,
    'msg':fields.String,
    'data':fields.Nested(data_fields)
}